<template>
    <view class="agreementDetails">
		<view v-html="agreement_info.content"></view>
	</view>
</template>

<script>
  import * as UserApi from '@/api/user'
  export default {
    data() {
      return {
         id: null,
		 agreement_info: {}, //协议信息
      }
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad({ id }) {
    	console.log(id,'id')
    	// 当前订单ID
    	this.id = id
		this.getAgreementInfo()
    },

    methods: {
	  //协议详情
	  getAgreementInfo: function() {
		  const app = this
		  UserApi.agreementDetail({id: app.id})
            .then(result => {
              app.agreement_info = result.data
            })
            .catch(err => {
            })
	  },
    }
  }
</script>

<style lang="scss" scoped>
 .agreementDetails{
	 padding: 20rpx;
 }
</style>